# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=libnsl
pkgver=2.0.1
pkgrel=0
pkgdesc="Public client interface for NIS(YP) and NIS+ in a IPv6 ready version"
url="https://github.com/thkukuk/libnsl"
arch="all"
license="LGPL-2.0-or-later"
makedepends="gettext-dev libtirpc-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/thkukuk/libnsl/releases/download/v$pkgver/libnsl-$pkgver.tar.xz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
0ffdf15b4380fc89bf11f4f64b74ed999099c0ab3ee39cafd52f933a5000f9b1ed3987c8c13533a7cd92474aadd4cc9909a2e1eabc9143f0cb11746385e5fc57  libnsl-2.0.1.tar.xz
"
